package com.gzhu.knowledgeAdmin.controller;


import com.gzhu.knowledgeAdmin.common.result.R;
import com.gzhu.knowledgeAdmin.service.TDxjgTService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/dxjg")
public class TDxjgTController {

    @Autowired
    private TDxjgTService tDxjgTService;

    @GetMapping("/query")
    public R customJoinQuery(
            @RequestParam(required = false) String fkhsjhm,
            @RequestParam(required = false) String fid,
            @RequestParam(required = false) String fkhsjhmmd5,
            @RequestParam(required = false) String fdxlx,
            @RequestParam(required = false) String fdxmb,
            @RequestParam(required = false) String fdrlx,
            @RequestParam(required = false) String ffslx,
            @RequestParam(required = false) String fwhrw,
            @RequestParam(required = false) String fjxzt,
            @RequestParam(required = false) String fsbyy,
            @RequestParam(required = false) String fdxtjsj,
            @RequestParam(required = false) String fdxtjsjStart,
            @RequestParam(required = false) String fdxtjsjEnd,
            @RequestParam(required = false) String fdxSubmitStart,
            @RequestParam(required = false) String fdxSubmitEnd,
            @RequestParam(required = false) String fdxSendStart,
            @RequestParam(required = false) String fdxSendEnd) {

        List<Map<String, Object>> result = tDxjgTService.customJoinQuery(fkhsjhm, fid, fkhsjhmmd5, fdxlx, fdxmb, fdrlx, ffslx, fwhrw, fjxzt, fsbyy, fdxtjsjStart, fdxtjsjEnd, fdxSubmitStart, fdxSubmitEnd, fdxSendStart, fdxSendEnd);
        return R.ok(new ResponseEntity<>(result, HttpStatus.OK));
    }
}
